package pl.com.like.sequoia.dao.bio;

import java.util.List;

import pl.com.like.sequoia.dao.IGenericDao;
import pl.com.like.sequoia.model.bio.BioObjectHandler;
import pl.com.like.sequoia.model.bio.enums.FileTypeEnum;

public interface IBioObjectHandlerDao extends IGenericDao<BioObjectHandler, Long> {

	public void commit();

	/**
	 * checks if in DB exists selected object
	 * 
	 * @param objectId id of object
	 * @param type type of object
	 * @return Boolean.TRUE if exists such an object in DB, else return Boolean.FALSE.
	 */
	public abstract Boolean exists(String objectId, FileTypeEnum type);

	/**
	 * get Object which have equal objectId and same type
	 * 
	 * @param objectId
	 * @param type
	 * @return object which have equal objectId and same type.
	 */
	public abstract BioObjectHandler get(String objectId, FileTypeEnum type);

	/**
	 * get list of {@link BioObjectHandler} objects.
	 * 
	 * @param patternId pattern for searching in object name or optional description params. SQL wildcards are allowed
	 * @param type type of searched object
	 * @param extended flag for
	 * @param maxSize maximum size of returned list.
	 * @return
	 */
	public abstract List<BioObjectHandler> searchObjects(String patternId, FileTypeEnum type, Boolean extended,
			Integer maxSize, Integer firstResult);

	public abstract List<BioObjectHandler> searchObjectsWithoutParams(Integer maxSize);

}